import request from '/@/utils/request';

export function fetchList(query?: Object) {
	return request({
		url: '/personnel/userClasses/pagescope',
		method: 'get',
		params: query,
	});
}

export function getUserList(query?: Object) {
	return request({
		url: '/personnel/userClasses/page',
		method: 'get',
		params: query,
	});
}
export function getUserList2(query?: Object) {
	return request({
		url: '/personnel/userClasses/page2',
		method: 'get',
		params: query,
	});
}
export function pkDeptList(query?: Object) {
	return request({
		url: '/personnel/userClasses/userClassByDept',
		method: 'get',
		params: query,
	});
}

export function addObj(obj?: Object) {
	return request({
		url: '/personnel/userClasses/setclass',
		method: 'put',
		data: obj,
	});
}

export function getObj(id?: string) {
	return request({
		url: '/personnel/userClasses/' + id,
		method: 'get',
	});
}

export function delObjs(ids?: Object) {
	return request({
		url: '/personnel/userClasses',
		method: 'delete',
		data: ids,
	});
}

export function putObj(obj?: Object) {
	return request({
		url: '/personnel/userClasses/setclass',
		method: 'put',
		data: obj,
	});
}

export function listscope(param?: string) {
	return request({
		url: 'admin/user/listscope?param=' + param,
		method: 'get',
	});
}

export function banCiList(query?: Object) {
	return request({
		url: '/personnel/classesInformation/page',
		method: 'get',
		params: query,
	});
}

export function banZuList(query?: Object) {
	return request({
		url: '/personnel/groupInformation/page',
		method: 'get',
		params: query,
	});
}

export function rulesList(query?: Object) {
	return request({
		url: '/personnel/classesRules/page',
		method: 'get',
		params: query,
	});
}
export function getuserwork(query?: Object) {
	return request({
		url: '/personnel/userClasses/getuserwork',
		method: 'get',
		params: query,
	});
}

export function setuserwork(obj?: Object) {
	return request({
		url: '/personnel/userClasses/setuserwork',
		method: 'put',
		data: obj,
	});
}

export function workScheduling(ids?: Object) {
	return request({
		url: '/personnel/workScheduling',
		method: 'delete',
		data: ids,
	});
}

export const deptTree = (params?: Object) => {
	return request({
		url: '/admin/dept/depttree',
		method: 'get',
		params,
	});
};

export const pageLists = (params?: Object) => {
	return request({
		url: '/admin/user/page',
		method: 'get',
		params,
	});
};

export function workTips(params?: Object) {
	return request({
		url: '/personnel/userClasses/workTips',
		method: 'get',
		params,
	});
}
